package com.prs.crm.service.person.impl;

import com.prs.crm.dao.person.PostChangeDao;
import com.prs.crm.domain.person.Dossier;
import com.prs.crm.domain.person.PostChange;
import com.prs.crm.service.impl.BaseServiceImpl;
import com.prs.crm.service.person.DossierService;
import com.prs.crm.service.person.PostChangeService;

public class PostChangeServiceImpl extends BaseServiceImpl<PostChange, PostChangeDao> implements PostChangeService{
	private DossierService dossierService;
	public DossierService getDossierService() {
		return dossierService;
	}
	public void setDossierService(DossierService dossierService) {
		this.dossierService = dossierService;
	}
	@Override
	public void savePostChange(PostChange postChange, Dossier dossier) {
		dossier.setDepartment(postChange.getDepartment());
		dossier.setPostSet(postChange.getPostSet());
		
		this.getDossierService().save(dossier);
		postChange.setDossier(dossier);

		this.getDao().save(postChange);
	}

}
